package com.ruitu.mall_98_2.mvp.contract;

import com.beanu.arad.base.BaseModel;
import com.beanu.arad.base.BasePresenter;
import com.beanu.arad.base.BaseView;
import com.ruitu.router_module.bean.api.BaseResult;
import com.ruitu.router_module.bean.api.PageModel;
import com.ruitu.router_module.bean.order.Order;
import com.ruitu.router_module.bean.order.SmallOrder;

import rx.Observable;

public interface OrderContract {
    interface Model extends BaseModel {
        Observable<BaseResult<PageModel<SmallOrder>>> getOtherAllOrders(String accountId, String status, String page, String size);

        Observable<BaseResult<Order>> orderInfo(String accountId);

        Observable<BaseResult> deleteOrder(String orderId);

        Observable<BaseResult> cancelOrder(String orderId);

        Observable<BaseResult> qrsh(String odId);

        Observable<BaseResult<String>> getOrderTracesByJson( String odId);
    }

    interface View extends BaseView {
        void setData1(PageModel<SmallOrder> orders);

        void setData(Order order);

        void setSuc();

        void setFail();
    }

    abstract class Presenter extends BasePresenter<View, Model> {
        public abstract void getOtherAllOrders(String accountId, String status, String page, String size);

        public abstract void orderInfo(String accountId);

        public abstract void deleteOrder(String orderId);

        public abstract void qrsh(String odId);

        public abstract void cancelOrder(String orderId);

        public abstract void getOrderTracesByJson( String odId);
    }
}
